# # 创建类
# class Foo:
#     # 创建类中的函数
#     def walk(self):
#         print("动物可以走路！！")
#
#
# # 创建类的对象 foo
# foo = Foo()


# class Person:
#
#     def __init__(self, name, age, gender):
#         self.name = name
#         self.age = age
#         self.gender = gender
#
#     def eat(self):
#         print("%s,%s岁,%s,吃奶" % (self.name, self.age, self.gender))
#
#     def DrinkWater(self):
#         print("%s,%s岁,%s,喝水" % (self.name, self.age, self.gender))
#
#     def __walk(self):
#         print("跑步。。。")
#
#     def goBed(self):
#         self.__walk()
#         print("%s,%s岁,%s,睡觉" % (self.name, self.age, self.gender))


# per = Person("king", 18, "男")
# per.goBed()


class Animal:

    def eat(self):
        print("%s 吃 " % self.name)

    def drink(self):
        print("%s 喝 " % self.name)

    def shit(self):
        print("%s 拉 " % self.name)

    def pee(self):
        print("%s 撒 " % self.name)


class Cat(Animal):

    def __init__(self, name):
        self.name = name
        self.breed = '猫'

    def eat(self):
        print("猫吃鱼--")

    def cry(self):
        print('喵喵叫')


class Dog(Animal):

    def __init__(self, name):
        self.name = name
        self.breed = '狗'

    def cry(self):
        print('汪汪叫')


c1 = Cat('猫one')
c1.eat()
c1.cry()

c2 = Cat('猫two')
c2.drink()

d1 = Dog('狗one')
d1.eat()
d1.cry()
